package com.server.control;


import com.server.bean.Doc;
import com.server.bean.File;
import com.server.webservice.WebService_;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class DocController {
    @Autowired
    WebService_ webService_;
    private String user = "jackey";

    @RequestMapping("/user")
    @ResponseBody
    public List<Doc>doc(){
        return webService_.docs(user);
    }


    @RequestMapping("/doc")
    @ResponseBody
    public List<File>file(){
        return webService_.files();
    }


}
